<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ include file="/pages/common/taglibs.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<script type="text/javascript" src="${ctx}/pages/templete/js/validate/cloud.js"></script>
<script type="text/javascript">
    $(function() {
        showOtherFileType();
        $("#fileType").change(function() {
            showOtherFileType();
        });
    });
    function showOtherFileType() {
        var val = $("#fileType").val();
        if(val) {
            $("#otherFileTypeSpan").hide();
            $("#otherFileType").val("");
        } else {
            $("#otherFileTypeSpan").show();
        }
    }
</script>
<style>
    .formTable{text-align:left;}

</style>

<form id="form" action="${ctx}/cloud/uploadCertController/doUpload.do" enctype="multipart/form-data" method="POST" target="_blank" >
    <input type="hidden" name="verficationCode" value="${config.verficationCode }"/>
    <table width="100%" class="formTable">
        <tr>
            <td width="35%" align=right>版本号:</td>
            <td>
                <select id="version" name="version">
                    <option value="2.1" selected="selected">2.1</option>
                </select>
            </td>
        </tr>
        <tr>
            <td align=right>交易代码:</td>
            <td>
                <input type="text" id="tranCode" name="tranCode" value="${config.tranCode}" size="50"/>
            </td>
        </tr>

        <tr>
            <td align=right>企业ID:</td>
            <td>
                <input type="text" id="merchantID" name="merchantID" value="${config.merchantID}" size="50"/>
            </td>
        </tr>
        <tr>
            <td align=right>协议号:</td>
            <td>
                <input type="text" id="agreeId" name="agreeId" value="${config.agreeId }" size="50"/>
            </td>
        </tr>
        <tr>
            <td align=right>文件类型:</td>
            <td>
                <%--<input id="fileType" name="fileType" type="text" size="50" />--%>
                <select id="fileType" name="fileType">
                    <option value='' selected>-----</option>
                    <option value='ID_CARD_FRONT'>身份证正面</option>
                    <option value='ID_CARD_BACK'>身份证反面</option>
                    <option value='HANDHELD_ID_CARD'>手持身份证</option>
                    <option value='BUSSINESS_LICENSE'>营业执照</option>
                    <option value='ORGANIZATION_CODE'>组织机构代码</option>
                    <option value='TAX_REGISTRATION'>税务登记证</option>
                    <option value='BANK_ACCOUNT_LICENCE'>银行开户许可证</option>
                </select>
                <span id="otherFileTypeSpan">其他：<input type="text" name="otherFileType" id="otherFileType" /></span>
            </td>
        </tr>
        <tr>
            <td align=right>上传文件:</td>
            <td>
                <input id="file" name="file" type="file" size="50" />
            </td>
        </tr>
        <tr>
            <td align=right>请求时间:</td>
            <td><input type="text" id="reqTime" name="reqTime"
                       value="${config.reqTime }" size="50" /></td>
        </tr>
        <tr>
            <td align=right>签名类型:</td>
            <td><input type="text" id="signType" name="signType"
                       value="${config.signType }" size="50" /></td>
        </tr>
        <tr>
            <td width="30%" align=right></td>
            <td align=left width="45%">&nbsp;&nbsp;1.md5 2.sha 3.api
            <td width="25%" align=left></td>
        </tr>
        <%--<tr>
            <td align=right>企业后台URL:</td>
            <td>
                <input type="text" id="backgroundMerUrl" name="backgroundMerUrl"
                       value="${config.backgroundMerUrl }" style="width:450px;"/></td>
        </tr>--%>
        <tr>
            <td colspan=3 width="100%">
                <center>
                    <input type="submit" name="submit" id="submit" value="开始测试" />
                </center>
            </td>
        </tr>


    </table>
</form>